package com.jty.lib_base.utils

import java.text.SimpleDateFormat
import java.util.*

object DateUtils {
    /**
     * 比较两个日期的大小，日期格式为yyyy-MM-dd
     *
     * @param str1 the first date
     * @param str2 the second date
     * @return true <br/>false
     */
    fun isDateOneBigger(str1: String, str2: String): Boolean {
        var isBigger = false
        val sdf = SimpleDateFormat("yyyy-MM-dd")
        var dt1 : Date? = null
        var dt2 : Date? = null
        dt1 = sdf.parse(str1)
        dt2 = sdf.parse(str2)
        if(dt1!!.time >= dt2!!.time) {
            isBigger = true
        }
        return isBigger
    }
}